//
//  ZYUnsubmittedCell.m
//  优学荟管理系统
//
//  Created by edz on 2017/12/25.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import "ZYUnsubmittedCell.h"
#import "ZYUnsubmittedsModel.h"
@implementation ZYUnsubmittedCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setUpSuperView];
    }
    
    
    
    return self;
    
}


- (void)assignByZYUnsubmittedsModel:(ZYUnsubmittedsModel *)model{
    
    BOOL isUp  = [NSString isBlankString:model.petname];
    
    if (isUp) {
          self.studentLabel.text = @"学生：";
    }else{
          self.studentLabel.text = [NSString stringWithFormat:@"学生：%@",model.petname];
    }
    
    
  
    
    
}


- (void)setUpSuperView{
    
    
    self.studentLabel = [UILabel new];
    self.studentLabel.font = [UIFont systemFontOfSize:16];
    self.studentLabel.textColor = ColorRGB(51, 51, 51);
    [self.contentView addSubview:self.studentLabel];
    
    
    self.studentLabel.text = @"学生：习近平";
    [self.studentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(kScreenWidth *35/750);
        make.top.offset(kScreenHeight *93/1334);
    }];
    
    
    
    UILabel *lineLabel = [UILabel new];
    lineLabel.backgroundColor = ColorRGB(247, 245, 245);
    [self.contentView addSubview:lineLabel];
    [lineLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(0);
        make.top.equalTo(self.studentLabel.mas_bottom).offset(kScreenHeight *93/1334);
        make.width.offset(kScreenWidth);
        make.height.offset(kScreenHeight *20/1334);
    }];

    
    
    
    [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0);
        make.bottom.mas_equalTo(lineLabel).offset(0);
    }];
    
    
    
    
    
    
    
}





















@end
